class Student:
    def __init__(self, sid=101, name="张三", age=18, sex="男"):
        self.sid = sid
        self.name = name
        self.age = age
        self.sex = sex
        self.students = []

    def get_sid(self):
        return self.sid

    def set_sid(self, sid):
        self.sid = sid

    def get_name(self):
        return self.name

    def set_name(self, name):
        if 2 <= len(name) <= 4:
            self.name = name
        else:
            print("学生名字输入不合法")

    def get_age(self):
        return self.age

    def set_age(self, age):
        if 8 <= age <= 25:
            self.age = age
        else:
            print("学生年领输入不合法")

    def get_sex(self):
        return self.sex

    def set_sex(self, sex):
        if sex == "男" or sex == "女":
            self.sex = sex
        else:
            print("学生性别输入不合法")

    def __str__(self):
        return f"学生编号：{self.sid},姓名：{self.name},年龄：{self.age},性别：{self.sex},全部学生信息{self.students}"


class StudentManage(Student):

    def add_student(self):
        self.sid = input("请输入学生编号：")
        self.name = input("请输入学生姓名：")
        self.age = input("请输入学生年纪：")
        self.sex = input("请输入学生性别：")
        s = {"编号": self.sid, "姓名": self.name, "年纪": self.age, "性别": self.sex}
        self.students.append(s)

    def get_all_student(self):
        print(self.students)



class Grades:
    def __init__(self,gname,grades):
        self.gname=gname
        self.grades=grades


class GradesManage:
    pass

def main():
    sm=StudentManage()
    sm.add_student()
    sm.add_student()
    sm.get_all_student()



main()